<template>
    <div>
        <h2>排房详情页面</h2>
        <a href="/pfxs">去排房显示</a>
        <table>
             <tr>
                <td>姓名</td>
                <td  >
                   {{ data.pfmc }}
                </td>
            </tr>
              <tr>
                <td>房号</td>
                <td  >
                   {{ data.fhid }}
                </td>
            </tr>
              <tr>
                <td>房型</td>
                <td  >
                   {{ data.fxid }}
                </td>
            </tr>
      
        </table>

    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref,onMounted } from 'vue';
import { useRoute } from 'vue-router';

const stor= useRoute();

const data=ref({
     "fxid": 2,
      "fhid": 2,
      "pfid": 2,
      "pfmc": "留鸭彬",
      "zt": true,
      "fhmc": "305",
      "fxmc": "三室一厅"
})

 const xs=()=>{
        var w= stor.query.pfid
    axios.get("https://localhost:7258/api/pfroom/pfxq",{params:{pfid:w}}).then(res=>{
        data.value=res.data
    })
 }
onMounted(()=>{
    xs();
   
 })





</script>

<style scoped>

</style>